#ifndef COREAPPLICATION_H
#define COREAPPLICATION_H

#include "GuidedNativeImageIO.h"
#include "ImageWrapperBase.h"
#include "GreyImageWrapper.h"
#include "SegImageWrapper.h"
#include "VisImageWrapper.h"
#include "VisWidgetBase.h"
#include "VolumeWidget.h"
#include "SlicerWidget.h"

#include <QList>
#include <QObject>

class CoreImageData: public QObject
{
    Q_OBJECT

public:
    typedef QList<ImageWrapperBase*> WrapperList;
    typedef typename WrapperList::iterator WrapperIterator;

    CoreImageData();
    ~CoreImageData();

    void LoadMainImage(GuidedNativeImageIO &guidedIO);

    bool IsMainImageLoaded()
    { return m_GreyWrapper->IsInitialized(); }

    void SetWorkingSegmentation(SegImageWrapper::SegmentationType segType);
    void WorkingMaterialChosen(int state, int label);

    Materials* GetMaterialsList()
    { return m_SegWrapper->GetMaterialsList(); }

    VisWidgetBase* GetWidget(VisWidgetBase::VisWidgetType widgetType)
    { return m_VisWrapper->GetWidget(widgetType); }

public slots:
    void SeedPointPicked(double x, double y, double z);

private:
    GreyImageWrapper *m_GreyWrapper;
    SegImageWrapper *m_SegWrapper;
    VisImageWrapper *m_VisWrapper;
    WrapperList m_ImageWrappers;
};

#endif

